{template 'admin','header'}
    <form action="admin/drag.php?action=manage" name="form1"  method="POST" onsubmit="return r_submit(this);">
    <table cellpadding="0" cellspacing="1" class="table_list">
        <caption>模板管理</caption>
        <tr>
            <th>所属站点</th>
            <th>别名</th>
            <th>母版</th>
            <th>管理操作</th>
        </tr>
        {loop $template_manage $m}
        <tr>

            <td class="align_c">{$m['siteid']}</td>
            <td class="align_c">{$m['byname']}</td>
            <td class="align_c">{$m['filename']}</td>
            <td class="align_c">
                <a href="{$self_dir}/drag.php?action=update_template&templateid={$m['templateid']}&forward={$forward}">修改</a>&nbsp;|&nbsp;
                <a href="javascript:my_request('{format_url("$self_dir/drag.php?action=delete_template&templateid=".$m['templateid'])}','确认要删除吗？')">删除</a>&nbsp;|&nbsp;
                <a href="{$self_dir}/drag.php?action=build_template&templateid={$m['templateid']}&forward={$forward}">生成</a>
            </td>
        </tr>
        {/loop}
    </table>
    <div class="button_box">
        <input class="button_style" name="add" type="button" value=" 添加模板 " onclick="self.location='{$self_url}?action=create_template&forward={$forward}&site_id={$site_id}'"/>
    </div>
    </form>
    <div id="pages">
        {$template_pages}
    </div>
{template 'admin','footer'}